#ifndef _XQUEUEWIDGET_H
#define _XQUEUEWIDGET_H

#include <qwidget.h>
#include <xqtinilayout.h>
#include <qprocess.h>

class QLabel;
class QTextEdit;
class QLineEdit;
class QTimer;

const char k_ini_file_queue[] = "ini/setup/layout_queuewidget.ini";
const char k_ini_sec_fullscreen[] = "FullScreen";
const char k_ini_sec_queuehead[]  = "QueueHead";
const char k_ini_sec_queuebody[]  = "QueueBody";
const char k_ini_sec_independentqueuewidget[] = "IndependentQueueWidget";
const char k_ini_sec_independentqueuebody[] = "IndependentQueueBody";
const char k_ini_sec_independentgreenbg[] = "IndependentGreenBackground";
const char k_ini_sec_independentbluebg[] = "IndependentBlueBackground";
const char k_ini_sec_queuead[]= "QueueAD";
const char k_ini_sec_logo[] = "Logo";
const char k_ini_sec_smallqueue[] = "SmallQueue";
const char k_ini_sec_layout7_green_bg[] = "Layout7GreenBackground";
const char k_ini_sec_layout7_blue_bg[]= "Layout7BlueBackground";
const char k_ini_sec_layout6_green_bg[] = "Layout6GreenBackground";
const char k_ini_sec_layout6_blue_bg[] = "Layout6BlueBackground";

const char k_full_background_blue[]  = "images/b1.bmp";
const char k_full_background_green[] = "images/b2.bmp";
const char k_body_background_blue[]  =  "images/qnowm_bg_blue.bmp";
const char k_body_background_green[] =  "images/qnowm_bg_green.bmp";
const char k_ad_background_blue[] = "badvertise1.bmp";
const char k_ad_background_green[] = "badvertise2.bmp";

/* **********************************************************
 * Class XQueueWidget  : Queue Number with Weight Measure
 * **********************************************************/
class XQueueWidget:public QWidget
{
	Q_OBJECT

public:
	XQueueWidget(QWidget* parent=0, Qt::WFlags f=0);
	~XQueueWidget();

	int	 setupUi(void);
	void showQueue(uint32_t in_qnumber);
	void stopQueue();
	void showWMLogo();
	void keepSmallQueue();
	void doHalt();
	void doResume();
	void resumeWidget();

signals:
	void sgShowQueueDone();

public slots:
	void slotSwitchBackground();

private:
	QLabel  *m_lbQueue;   //show Q into the big label
	QLabel  *m_lbLogo;
	QLabel  *m_lbSmallQueue;
	uint32_t m_queueNumber;  
	bool     m_isShowQno;
	XQtIniLayout m_iniLayout;
	QTimer  *m_timer;
	int      m_counter;
	int      m_layout;
	QString  m_bgFileBlue;
	QString  m_bgFileGreen;
	QProcess m_proc;
	QLabel  *m_lblGreenBackground;
	QLabel  *m_lblBlueBackground;
};
#endif
